<div class="portfolio-full">
	<div class="nav">
		<?php 
		if(isset($neighbors['prev']['Portfolio'])) {
			echo $html->link(__('Prev', true), array('action'=>'view', $neighbors['prev']['Portfolio']['slug']), array('class'=>'prev'));
		}
		if(isset($neighbors['next']['Portfolio'])) {
			echo $html->link(__('Next', true), array('action'=>'view', $neighbors['next']['Portfolio']['slug']),array('class'=>'next'));
		}
		?>
		<h2><?php echo $portfolio['Portfolio']['title'];?></h2>
	</div>
	<?php //debug($neighbors)?>
	<div class="holder">
		<?php if( isset($portfolio['Upload'][0]['filename']) ): ?>
		<div class="col col-1">
				<div class="border" id="main_img">
					<div class="crop">
				<?php $full = $portfolio['Upload'][0]['dir'] . DS . $portfolio['Upload'][0]['filename'];
				//echo $gershImage->resize($full, 'portfolio_full', array('title' => $portfolio['Upload'][0]['title']));?>
				<?php echo $lightbox->img(null, $full, array('title' => $portfolio['Upload'][0]['title'],'alt' => $portfolio['Upload'][0]['title']), array(), 'portfolio_full');?>
					</div>
				</div>
			
		</div>
		<?php endif; ?>
		<div class="col col-2">
			<div class="body html">
				<?php echo $textile->TextileThis($portfolio['Portfolio']['description'])?>
			</div>
			<dl>
				
				<dt><?php __('Category'); ?></dt>
				<dd class="category"><?php $max = count($portfolio['Category']); foreach($portfolio['Category'] as $num => $category):?>
				<?php 
				echo $html->link($category['title'], array('action'=>'index', $category['slug'])); 
				if($num != ($max-1)) echo ","; ?>
				<?php endforeach; ?></dd>
				<dt><?php __('Customer'); ?></dt>
				<dd><?php 
					if(!empty($portfolio['Portfolio']['url'])) {
						echo $html->link($portfolio['Portfolio']['customer'], $portfolio['Portfolio']['url'], array('rel'=>'external'));
					} else {
						echo $portfolio['Portfolio']['customer'];
					}
				 ?></dd>
				<dt><?php __('Work Place'); ?></dt>
				<dd><?php echo $portfolio['Portfolio']['work_place']; ?></dd>
				<dt><?php __('Date'); ?></dt>
				<dd><?php echo date('M Y', $time->toUnix($portfolio['Portfolio']['date'])); ?></dd>
			</dl>
			<ul class="images">
				<?php foreach($portfolio['Upload'] as $upload):?>
					<?php if(!empty($upload['filename'])): ?>
				<li>
					<div class="border" id="main">
						<div class="crop">
								<?php echo $lightbox->img(null, $upload['dir'] . DS . $upload['filename'], array('title' => $upload['title'],'alt' => $upload['title']), array(), 'portfolio_thumb');?>
							
						</div>
					</div>
				</li>
				<?php endif; ?>
				<?php endforeach;?>
			</ul>
			<?php echo $html->link(__('Back to list', true), array('action'=>'index'), array('class'=>'action-link')); ?>
		</div>
		

	</div>
</div>

